package com.hckjsec.system.service.impl;

import java.util.List;
import com.hckjsec.common.utils.DateUtils;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hckjsec.system.mapper.SysMatterMapper;
import com.hckjsec.system.domain.SysMatter;
import com.hckjsec.system.service.ISysMatterService;

/**
 * 公证事项Service业务层处理
 * 
 * @author cyt
 * @date 2021-08-02
 */
@Service
public class SysMatterServiceImpl implements ISysMatterService 
{
    @Autowired
    private SysMatterMapper sysMatterMapper;

    /**
     * 查询公证事项
     * 
     * @param matterId 公证事项ID
     * @return 公证事项
     */
    @Override
    public SysMatter selectSysMatterById(Long matterId)
    {
        return sysMatterMapper.selectSysMatterById(matterId);
    }

    /**
     * 查询公证事项列表
     * 
     * @param sysMatter 公证事项
     * @return 公证事项
     */
    @Override
    public List<SysMatter> selectSysMatterList(SysMatter sysMatter)
    {
        return sysMatterMapper.selectSysMatterList(sysMatter);
    }

    /**
     * 新增公证事项
     * 
     * @param sysMatter 公证事项
     * @return 结果
     */
    @Override
    public int insertSysMatter(SysMatter sysMatter)
    {
        sysMatter.setCreateTime(DateUtils.getNowDate());
        return sysMatterMapper.insertSysMatter(sysMatter);
    }

    /**
     * 修改公证事项
     * 
     * @param sysMatter 公证事项
     * @return 结果
     */
    @Override
    public int updateSysMatter(SysMatter sysMatter)
    {
        sysMatter.setUpdateTime(DateUtils.getNowDate());
        return sysMatterMapper.updateSysMatter(sysMatter);
    }

    /**
     * 批量删除公证事项
     * 
     * @param matterIds 需要删除的公证事项ID
     * @return 结果
     */
    @Override
    public int deleteSysMatterByIds(Long[] matterIds)
    {
        return sysMatterMapper.deleteSysMatterByIds(matterIds);
    }

    /**
     * 删除公证事项信息
     * 
     * @param matterId 公证事项ID
     * @return 结果
     */
    @Override
    public int deleteSysMatterById(Long matterId)
    {
        return sysMatterMapper.deleteSysMatterById(matterId);
    }

    @Override
    public List<SysMatter> selectSysMatterByNumber(String  matterNumber) {
        return sysMatterMapper.selectSysMatterByNumber(matterNumber);
    }

    @Override
    public List<SysMatter> selectSysMatterByIdLength(String idLength) {
        return sysMatterMapper.selectSysMatterByIdLength(idLength);
    }

    @Override
    public List<SysMatter> selectSysMatterByMatterNumberList(String[] matterNumbers) {
        return sysMatterMapper.selectSysMatterByMatterNumberList(matterNumbers);
    }
}
